package com.md.api.dao;

import com.md.api.entity.PictureInfo;
import com.md.api.entity.SysPcConfiguration;
import com.md.api.entity.SysPcDocInstruction;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface PictureInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PictureInfo record);

    int updatePicture(PictureInfo record);

    void setCoverImage(PictureInfo pictureInfo);

    List<PictureInfo> getByPhotoId(@Param("photoId")String photoId,@Param("keyword")String keyword,@Param("cherryPick")Integer cherryPick);
    PictureInfo getByPictureId(String pictureId);

    int setIsCherryPick(@Param("pictureIds") List<String> pictureIds);

    void transferPicture(@Param("photoId") String photoId, @Param("pictureIds") List<String> pictureIds);

    List<PictureInfo> randPictureShow();

    int deleteByPictureId(@Param("pictureId")String pictureId);

    List<PictureInfo> getLessPicByUserId(@Param("userId")String userId,@Param("classLevel")Integer classLevel);
    List<PictureInfo> getMostPicByUserId(@Param("userId")String userId,@Param("classLevel")Integer classLevel);

    void handleExpirePicture();

    List<PictureInfo> getPictureByStatus(Integer status);

    List<SysPcConfiguration> picShow();

    int setPicShow(SysPcConfiguration pcConfiguration);
    int setDocShow(SysPcDocInstruction docInstruction);
    List<SysPcDocInstruction> docInstruction(@Param("docType")String docType,@Param("code")String code);

    int delDoc(Integer id);

    void newDoc(SysPcDocInstruction pcConfiguration);

    PictureInfo getByUrl(@Param("picPath")String picPath);
}